<?php
/**
 * @author qingyu8@staff.weibo.com
 * @date 2018/04/19
 * @var $item
 * @var $type
 */
/* @var $this yii\web\View */

use yii\helpers\Url;

$postUrl = Url::to([
    'translate'
]);
$this->registerJs('
$("#submit").click(function(){
$.post("' . $postUrl . '",$("#form").serialize(),function(res){console.log(res);if(res.err==0){history.back();}},"json");
});
');
?>
<form class="form-horizontal" id="form" onsubmit="return false;">
	<div class="form-group"><label class="col-sm-2 control-label">取消政策翻译表</label>
		<div class="col-sm-10"><textarea class="form-control" name="map" rows="30" placeholder="格式例子：If you Cancel|如果您取消  每行一个"></textarea>
		</div>
	</div>
	<div class="form-group"><label class="col-sm-2"></label>
		<div class="col-sm-10">
			<button type="button" id="submit" class="btn btn-primary">翻译</button>
		</div>
	</div>
</form>


<script>

</script>
